Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Lotus Expeditor wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL forums and blogs
  • Home
  • Product Documentation
  • Community Articles
Search
Community Articles > Expeditor Client for Desktop > Sample: Using Accounts with Web Services
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Sample: Toolbar and Menu Contributions

Expeditor user interface team best practices on toolbar and menu contributions

Sample: Component Properties

OverviewComponent properties allow developers to create code that at compile time has specific function but accepts flexible input at runtime. For example, a developer can create a component that uses a predefined component property to update the title tab's text within a composite ...

Sample: Multiuser Features

Overview When multiple users share the same workstation, the configuration is referred to as a multiuser installation. This means that a single Expeditor client exists and is shared among all users; however, each user has their own workspace containing configuration details specific to that ...

Sample: Starting Plugins

Overview By default, Eclipse plugins are lazy. Lazy is the technical term (located in the bundle's manifest) that means that plugins are started when a request is either directly made by the Platform to start the plugin or indirectly through class loading. For example, the latter case implies ...

Sample: HTTP Communication

Overview The enhanced HTTP client in Expeditor allows developers to quickly create code that requests data from remote servers over HTTP or HTTPS. The enhanced client wraps the standard Java URLConnectionclasses such that authenticated requests leverage the Accounts framework and HTTPS ...
Community articleSample: Using Accounts with Web Services
Added by ~Tip Desachekli | Edited by ~Tip Desachekli on May 12, 2011 | Version 7
  • Actions Show Menu▼
expanded Abstract
collapsed Abstract
The accounts framework provides name, password credentials to various back-end servers. If required, Axis web services can be used in conjunction with the accounts framework to provide WS security data to the application server.
Tags: accounts, samples, web services
ShowTable of Contents
HideTable of Contents
  • 1 Overview
  • 2 Web Service
  • 3 Creating the Axis Web Service Client
  • 4 Assigning the Account
  • 5 Using the Account

Overview


The accounts framework provides name, password credentials to various back-end servers. If required, Axis web services can be used in conjunction with the accounts framework to provide WS security data to the application server.

Web Service


The details of the web service are covered in another sampleexternal link. The web service simply returns the time from the remote server.

Creating the Axis Web Service Client


Creating the client is very straight-forward. Using the WSDL from the web service:
  1. Create a client services project to contain the WSDL file.
  2. Select the WSDL file in the project explorer.
  3. Right mouse-click -> Web Services -> Generate Client.
  4. Select the Apache Axis for Client Services type and remaining default options.



Assigning the Account


The wizard will update the plugin.xml to enable account integration. The plugin XML appears as the following.

<extension
         point="com.ibm.pvc.jndi.provider.java.binding">
      <binding
            jndi-name="com.ibm.rcp.support.ws.remote.RemoteSystem"
            objectFactory-id="com.ibm.rcp.ws.objectfactory.WSObjectFactory">
      </binding>
   </extension>
   <extension
         point="com.ibm.rcp.ws.objectfactory.WSfactoryobject">
      <WSobject
            account-key="Axis Sample"
            class="com.ibm.rcp.support.ws.remote.RemoteSystem"
            jndi-name="com.ibm.rcp.support.ws.remote.RemoteSystem">
      </WSobject>
   </extension>


Ensure the account-key value reflects an existing account. In the example, the account references a WebSphere Application Server v6.1 using LDAP security.



Using the Account


When the web service client executes the following occurs.
  1. The Axis Sample account is retrieved by the Expeditor platform.
  2. An authentication request is made to the authentication URL in the account.
  3. A WS security header is constructed to contain the LTPA token obtained from step 2.
  4. The header and SOAP envelop are posted to the web service address obtained from the web service client code.

To ensure the platform creates an authenticated request using the web service, you must obtain the client code through JNDI.

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
				"com.ibm.pvc.jndi.provider.java.InitialContextFactory");

InitialContext ic = new InitialContext(env);

RemoteSystem rs = (RemoteSystem) ic.lookup("com.ibm.rcp.support.ws.remote.RemoteSystem");
		
System.out.println(rs.getSystemTime());

  • Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (7)
collapsed Versions (7)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (7)May 12, 2011, 6:17:06 PM~Tip Desachekli  
6Oct 5, 2010, 3:19:29 PM~Lily Minlusteretsi  IBM contributor
5Oct 5, 2010, 1:02:45 PM~Lily Minlusteretsi  IBM contributor
4Sep 15, 2010, 4:48:46 PM~Lily Minlusteretsi  IBM contributor
3Sep 15, 2010, 12:40:34 AM~Lily Minlusteretsi  IBM contributor
2Sep 15, 2010, 12:33:41 AM~Lily Minlusteretsi  IBM contributor
1Sep 15, 2010, 12:16:11 AM~Tip Desachekli  
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software Support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL Software
  • Privacy
  • Accessibility